package com.cherrish.free4j.web.service.sys.impl;

import com.cherrish.free4j.basic.generic.GenericDao;
import com.cherrish.free4j.basic.generic.GenericServiceImpl;
import com.cherrish.free4j.web.dao.sys.PermissionMapper;
import com.cherrish.free4j.web.model.sys.Permission;
import com.cherrish.free4j.web.service.sys.PermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 权限Service实现类
 *
 * @author cherrish
 * @since 2016年8月27日 下午12:05:03
 */
@Service
public class PermissionServiceImpl extends GenericServiceImpl<Permission, Long> implements PermissionService {

    @Resource
    private PermissionMapper permissionMapper;


    @Override
    public GenericDao<Permission, Long> getDao() {
        return permissionMapper;
    }

    @Override
    public List<Permission> selectPermissionsByRoleId(Long roleId) {
        return permissionMapper.selectPermissionsByRoleId(roleId);
    }
}
